<%@ page contentType="text/html;charset=UTF-8" pageEncoding="UTF-8"%>
<%@ include file="/WEB-INF/page/inc/taglib.jsp"%>
<div class="pageContent">
	<form method="post" action="${pageContext.request.contextPath}${requestScope.record ==null ?'/system/role/insert' :'/system/role/update' }" class="pageForm required-validate" onsubmit="return validateCallback(this, dialogAjaxDone);">
		<div class="pageFormContent" layoutH="56">
			<!-- 关闭窗口 -->
			<input type="hidden" name="callbackType" value="closeCurrent" />
			<!-- 隐藏表单 -->
			<c:if test="${requestScope.record !=null}">
				<input type="hidden" name="id" value="${requestScope.record.id}" />
			</c:if>
			<p>
				<label>名称</label> <input name="name" class="required" maxlength="32" type="text" value="${requestScope.record.name}" />
			</p>
			<p>
				<label>部门</label> 
				<select class="combox" name="dmid">
					<option value="">请选择</option>
					<c:forEach items="${requestScope.departments }" var="item">
						<option value="${item.id }" ${item.id == requestScope.record.dmid?'selected':''}>${item.name }</option>
					</c:forEach>
				</select>
			</p>
			<p>
				<label>上级岗位</label> 
				<select class="combox" name="pid">
					<option value="">请选择</option>
					<c:forEach items="${requestScope.roles }" var="item">
						<option value="${item.id }" ${item.id == requestScope.record.pid?'selected':''}>${item.name }</option>
					</c:forEach>
				</select>
			</p>
			<p class="nowrap">
				<label>备注</label>
				<textarea cols="45" rows="5" name="remk" maxlength="200">${requestScope.record.remk }</textarea>
			</p>
		</div>
		<div class="formBar">
			<ul>
				<!--<li><a class="buttonActive" href="javascript:;"><span>保存</span></a></li>-->
				<li><div class="buttonActive">
						<div class="buttonContent">
							<button type="submit">保存</button>
						</div>
					</div></li>
				<li>
					<div class="button">
						<div class="buttonContent">
							<button type="button" class="close">取消</button>
						</div>
					</div>
				</li>
			</ul>
		</div>
	</form>
</div>
